package com.yql.dao;

import com.yql.entity.Goods;
import com.yql.entity.Order;
import com.yql.entity.OrderVO;
import com.yql.entity.User;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface OrderDao {
    List<Order> listOrder(@Param(("user")) User user,@Param("vo") OrderVO vo);

    Order listOrderByOrderId(@Param("orderId") Long orderId);

    List<Goods> listGoodsByOrderId(@Param("orderId") Long orderId);

    void addOrder(Order order);

    Goods selectGoodsByName(String goodsName);

    void addMiddle(@Param("order") Order order,@Param("goods") Goods goods1,@Param("goodsTotal") Integer goodsTotal);

    void addGoods(Goods goods);
    //删除订单
    Integer deleteById(Long id);
    //删除中间表
    Integer deleteMiddle(Long id);
}
